<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        .warp {
            background-color: yellow;
            height: 300px;
        }
        
        .warp div {
            width: 800px;
            height: 100px;
            border: 2px solid #f00;
        }
        
        .warp1 {
            display: flex;
            flex-wrap: nowrap;
            /* 不换行，如果宽没有  超出距离 弹性盒子会自动伸缩 不换行 */
        }
        
        .warp2 {
            display: flex;
            flex-wrap: wrap;
        }
        
        .warp3 {
            display: flex;
            flex-wrap: wrap-reverse;
        }
        
        .warp4 {
            display: flex;
            flex-wrap: wrap;
            background-color: pink;
        }
        
        .warp5 {
            display: flex;
        }
    </style>
</head>

<body>
    <div class="warp warp1">
        <div>box1</div>
        <div>box2</div>
        <div>box3</div>
    </div>
    <hr>
    <div class="warp warp2">
        <div>box1</div>
        <div>box2</div>
        <div>box3</div>
    </div>
    <hr>

    <div class="warp warp3">
        <div>box1</div>
        <div>box2</div>
        <div>box3</div>
    </div>
    <hr>

    <div class="warp warp4">
        <div>box1</div>
        <div>box2</div>
        <div>box3</div>
    </div>
    <hr>
    <!-- <div class="warp warp5">
        <div>box1</div>
        <div>box2</div>
        <div>box3</div>
    </div>  -->


</body>

</html>